Package-level declarations

Types

Link copied to clipboard
open class AssistantMessage constructor(content: String, val name: String? = null, val awaitable: Awaitable<*, *>? = null, val timestamp: Instant = Instant.now()) : Message, AssistantContent

Message sent by the assistant - currently text-only

Link copied to clipboard
class AssistantMessageWithToolCalls constructor(content: String = "", val toolCalls: List<ToolCall>, val name: String? = null, val timestamp: Instant = Instant.now()) : AssistantMessage

An assistant message that includes tool calls. Extends AssistantMessage to include the tool calls the LLM wants to make.

Link copied to clipboard
interface Chatbot

A chatbot can conduct multiple chat sessions, each identified by a contextId.

Link copied to clipboard
interface ChatSession

Simplest possible conversation session implementation Responsible for keeping its conversation up to date via Conversation.addMessage(), and for sending messages to the OutputChannel.

Link copied to clipboard
sealed interface ContentPart

Represents a part of a multimodal message. This sealed interface ensures type safety and extensibility for future media types.

Link copied to clipboard
interface Conversation

Conversation shim for agent system. Mutable.

Link copied to clipboard
fun interface ConversationFormatter

Format a conversation into a String for inclusion in a prompt. Note that we often prefer to use messages.

Link copied to clipboard
data class ImagePart(val mimeType: String, val data: ByteArray) : ContentPart

A part of a message containing image data.

Link copied to clipboard
sealed class Message : HasContent

Message class for agent system - now supports multimodal content

Link copied to clipboard
fun interface MessageFormatter
Link copied to clipboard
enum Role : Enum<Role>

Role of the message sender. For visible messages, not user messages.

Link copied to clipboard
class SystemMessage constructor(content: String, val timestamp: Instant = Instant.now()) : Message

System message - text-only

Link copied to clipboard
data class TextPart(val text: String) : ContentPart

A part of a message containing text content.

Link copied to clipboard
data class ToolCall(val id: String, val name: String, val arguments: String)

Represents a tool call requested by the assistant.

Link copied to clipboard
class ToolResultMessage constructor(val toolCallId: String, val toolName: String, content: String, val timestamp: Instant = Instant.now()) : Message

Message containing the result of a tool execution. This is sent back to the LLM after executing a tool.

Link copied to clipboard

Message sent by the user - supports multimodal content

Link copied to clipboard

Builder for creating multimodal UserMessages fluently

Link copied to clipboard
class WindowingConversationFormatter constructor(messageFormatter: MessageFormatter = SimpleMessageFormatter, windowSize: Int = 100, startIndex: Int = 0) : ConversationFormatter

Conversation formatter that shows the last windowSize messages, optionally skipping the first startIndex messages.

Functions

Link copied to clipboard

Create a UserMessage builder